package router

import (
	"github.com/gin-gonic/gin"
	"go-mall/app/client/api"
)

type ShopCartRouter struct{}

func (r *ShopCartRouter) ClientShopCartRouter(publicRouter *gin.RouterGroup, privateRouter *gin.RouterGroup) {
	shopCartApi := api.ClientApi.ShopCartApi
	privateShopCartRouter := privateRouter.Group("shopCart")
	{
		privateShopCartRouter.GET("list", shopCartApi.ShopCartList)        // 购物车列表
		privateShopCartRouter.POST("save", shopCartApi.SaveShopCart)       // 添加购物车
		privateShopCartRouter.PUT("update", shopCartApi.UpdateShopCart)    // 修改购物车
		privateShopCartRouter.DELETE("delete", shopCartApi.DeleteShopCart) // 删除购物车
	}

}
